package com.tju.Controller.pageLink;

import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Boyu on 2017/2/28.
 */
@Controller
public class SysUserController {

    private final static String PAGE_PREFIX = "user";

    @RequestMapping(value = PAGE_PREFIX + "/jbxx", method = RequestMethod.GET)
    public String admin(HttpServletRequest request, Model model) {
   /*     HttpSession session = request.getSession();
        int loginId = (int) session.getAttribute("loginId");
        String menuTree = buildMenuTree(loginId);
        if(menuTree!=null)
        {
            model.addAttribute("isMenuCreateSuccess",true);
            model.addAttribute("menuList",menuTree);
        }else{
            model.addAttribute("isMenuCreateSuccess",false);
        }*/
        return "admin/jbxx";
    }

    @RequestMapping(value = PAGE_PREFIX + "/jbqk", method = RequestMethod.GET)
    @ResponseBody
    public String jbqk(HttpServletRequest request, Model model) {
   /*     HttpSession session = request.getSession();
        int loginId = (int) session.getAttribute("loginId");
        String menuTree = buildMenuTree(loginId);
        if(menuTree!=null)
        {
            model.addAttribute("isMenuCreateSuccess",true);
            model.addAttribute("menuList",menuTree);
        }else{
            model.addAttribute("isMenuCreateSuccess",false);
        }*/
        return JSON.toJSONString("基本情况");
    }

}
